The present invention relates to a microprocessor and its control method and, more particularly, to a microprocessor, which is suitable for facilitating its own fault diagnosis and debugging of a microprogram, and its control method.
The microprocessor is becoming more and more large-scale, complicated and multi-functioned as the high integration of an LSI advances. In accordance with this, the microprogram for realizing one microinstruction has a tendency to become longer and longer to make it more difficult to conduct the debugging of the microprogram and the various tests and fault diagnosis of the microprocessor.
In case the operation of the microprocessor is to be stopped, there is in the prior art a method of applying a HALT signal to the HALT pin. In the case of the MC68000, for example, when the HALT signal is input, the MC68000 brings its address bus, data bus and bus control signal into a high-impedance state to stop its operation, at the instant when it completes a bus cycle if it is executing the bus cycle, and instantly if there is no bus cycle being executed.
In this way, the microprocessor is not instantly brought into its stopped state, even if the HALT signal is fed during the execution of the bus cycle, so that it does not stop its operation before it executes the microprogram until the start of a subsequent bus cycle. In other words, the microprocessor cannot stop its operation before it comes to the boundary of the bus cycle. Nor can the operation of the microprocessor be stopped or an arbitrary boundary of a plurality of clock cycles composing the bus cycle.
The HALT pin of the microprocessor is so intrinsically provided that the external bus can be used with a DMAC (i.e., Direct Memory Access Controller) and another microprocessor, and is not intended to have the fault diagnosis of the microprocessor or itself or the LSI as its main target. As a result, the operation stop by the HALT signal cannot sufficiently cope by itself with the microprocessor used as the LSI which is being integrated to a higher level, made to have a higher performance and be more complicated.